# -*- coding: UTF-8 -*-
"""
@Filename:exerc2.py
@author:Cora
@time:2025-02-21
"""
n = int(input("请输入一个正整数N: "))
sum = 0
i = 1
while i <= n:
    sum += i
    i += 1
print("1到N的整数和为: ",sum)